import { httpInstance } from '@/utils/request'

interface FetchProjectNodeListAPIParams {
  project_id: string
}

interface FetchProjectNodeListAPIResData {
  code: number
  data: ProjectNode[]
  msg: string
  time: string
}

export function fetchProjectNodeListAPI(
  params: FetchProjectNodeListAPIParams,
  token: string,
) {
  return httpInstance.get<FetchProjectNodeListAPIResData, FetchProjectNodeListAPIParams>(
    'api/Project_extend/projectNodeList',
    { params, headers: { token } },
  )
}
